package com.hfkh.keyun.controller.frontend;
import com.hfkh.keyun.common.ApiResult;
import com.hfkh.keyun.service.VideoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
@RestController
@RequestMapping("/app/video")
@Api(tags = "视频管理")
public class VideoControllerApp {
    @Resource
    private VideoService videoService;
    @GetMapping("/thumbVideo")
    @ApiOperation("根据id进行视频点赞")
    public ApiResult thumbVideo( Integer id){
        Integer integer = videoService.thumbVideo(id);
        if (integer == 1){
            return ApiResult.ok("点赞成功", "头像上传成功！");
        }else {
            return ApiResult.fail("点赞失败！");
        }
    }
}
